package com.thoughtworks.android.androsphere.dao.model;

public class ClientRegistration {
    private String deviceId;
    private String registrationId;

    public ClientRegistration(String deviceId, String registrationId) {
        this.deviceId = deviceId;
        this.registrationId = registrationId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public String getRegistrationId() {
        return registrationId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ClientRegistration that = (ClientRegistration) o;

        if (deviceId != null ? !deviceId.equals(that.deviceId) : that.deviceId != null) {
            return false;
        }
        if (registrationId != null ? !registrationId.equals(that.registrationId) : that.registrationId != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = deviceId != null ? deviceId.hashCode() : 0;
        result = 31 * result + (registrationId != null ? registrationId.hashCode() : 0);
        return result;
    }
}
